/*
 * @Author: JoeLiao
 * @Date: 2024-11-02 12:16:42
 * @LastEditors: JoeLiao 1094153928@qq.com
 * @LastEditTime: 2024-11-03 21:05:38
 * @FilePath: \vue3_admin_master\src\main.ts
 * @Description:
 *
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
 */
import { createApp } from 'vue'
import App from '@/App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//@ts-ignore忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// svg插件需要的配置代码
import 'virtual:svg-icons-register'
// 引入component下的根文件index.ts
import globalComponent from '@/components/index'
// 引入模板的全局样式
import '@/styles/index.scss'
// 引入路由
import router from '@/router/index'
// 引入仓库
import pinia from './store'

// 获取实例对象
const app = createApp(App)

// 安装element-plus组件
app.use(ElementPlus, {
  locale: zhCn,
})
// 安装全局组件
app.use(globalComponent)
// 注册路由
app.use(router)
// 安装仓库
app.use(pinia)
// 引入路由鉴权
import './permission'

app.mount('#app')
